import request from '@/utils/request'

// 车辆安全监测 VO
export interface VehicleSafetyVO {
	id : number // 编号
	licensePlate : string // 车排号
	ownerShip : string // 所属(描述车辆归属的信息)
	ownerName : string // 车主
	ownerPthone : number // 车主电话
	inspectorName : string // 安全检测人
	inspectorPhone : number // 安全检测人电话
	vehicleMonitor : number // 车辆监控确认人员
	remark : string // 备注
	processInstanceId : string // 流程编号
	status : number // 审批状态
	attachments:any  //附件
	attachmentsName:any  //附件名称
	startUserSelectAssignees : any // 审批状态
	isApproved : any
	eids : any;
	ename : any;
}

// 车辆安全监测 API
export const VehicleSafetyApi = {
	// 查询车辆安全监测分页
	getVehicleSafetyPage: async (params : any) => {
		return await request.get({ url: `/bpm/vehicle-safety/page`, params })
	},

	// 查询车辆安全监测详情
	getVehicleSafety: async (id : number) => {
		return await request.get({ url: `/bpm/vehicle-safety/get?id=` + id })
	},

	// 新增车辆安全监测
	createVehicleSafety: async (data : VehicleSafetyVO) => {
		return await request.post({ url: `/bpm/vehicle-safety/create`, data })
	},

	// 修改车辆安全监测
	updateVehicleSafety: async (data : VehicleSafetyVO) => {
		return await request.put({ url: `/bpm/vehicle-safety/update`, data })
	},

	// 删除车辆安全监测
	deleteVehicleSafety: async (id : number) => {
		return await request.delete({ url: `/bpm/vehicle-safety/delete?id=` + id })
	},

	// 导出车辆安全监测 Excel
	exportVehicleSafety: async (params:any) => {
		return await request.download({ url: `/bpm/vehicle-safety/export-excel`, params })
	},
}